<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>添加/更新</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/admin/css/animate.min.css" rel="stylesheet">
    <link href="/admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="/admin/frame/layer/css/layui.css" rel="stylesheet">

</head>
<body>
<div class="container-fluid" style="margin-top: 30px;">
    <div class="row">
        <div class="col-sm-12 col-md-12">
            <form class="form-horizontal" id="addForm" action="/Admin/Ware/WareAppointment/addOrUpdate">
                <c:if test="${isUpdate==true}">
                    <div class="form-group hidden">
                        <label class="col-sm-2 control-label"><span style="color: red">*</span>编号：</label>
                        <div class="col-sm-6">
                            <input name="id"  value="${obj.id}" class="form-control">
                        </div>
                    </div>
                </c:if>




                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>用户名：</label>
                            <div class="col-sm-6">
                                    <input disabled  name="userId" min="0" type="text"   value="${obj.sysUser.username}" class="form-control" placeholder="请输入用户编号">
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>商品名：</label>
                            <div class="col-sm-6">
                                    <input disabled  name="goodsId" min="0" type="text"  value="${obj.wareGoodsInfo.goodsName}" class="form-control" placeholder="请输入商品编号">
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>预约时间：</label>
                            <div class="col-sm-6">
                                    <p class="form-control-static">
                                        <input disabled  name="appointmentTime"  type="datetime"  value=" <fmt:formatDate value="${obj.appointmentTime}" pattern="yyyy-MM-dd hh:mm:ss" />" class="form-control" placeholder="请输入预约时间">

                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>创建时间：</label>
                            <div class="col-sm-6">
                                    <p class="form-control-static">
                                        <input disabled  name="createTime"  type="datetime"  value=" <fmt:formatDate value="${obj.createTime}" pattern="yyyy-MM-dd hh:mm:ss" />" class="form-control" placeholder="请输入创建时间">

                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>预约状态：</label>
                            <div class="col-sm-6">
                                <select  class="form-control" name="stateId">
                                    <c:forEach items="${typeList2}" var="item">
                                    <c:if test="${item.id eq obj.stateId}">
                                        <option selected value="${item.id}">${item.dvalue}</option>
                                    </c:if>
                                    <c:if test="${isUpdate!=true||item.id!=obj.stateId}">
                                    <option value="${item.id}">${item.dvalue}</option>
                                    </c:if>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>联系人：</label>
                            <div class="col-sm-6">
                                    <input required name="contactsName" minlength="0" maxlength="12" type="text"  value="${obj.contactsName}" class="form-control" placeholder="请输入联系人"/>
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>联系电话：</label>
                            <div class="col-sm-6">
                                    <input required name="contactsPhone" minlength="0" maxlength="11" type="text"  value="${obj.contactsPhone}" class="form-control" placeholder="请输入联系电话">
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>接待人：</label>
                            <div class="col-sm-6">
                                    <input required name="receiverName" minlength="0" maxlength="12" type="text"  value="${obj.receiverName}" class="form-control" placeholder="请输入接待人">
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>接待联系电话：</label>
                            <div class="col-sm-6">
                                    <input required name="receiverPhone" minlength="0" maxlength="11" type="text"  value="${obj.receiverPhone}" class="form-control" placeholder="请输入接待联系电话">
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>最新操作时间：</label>
                            <div class="col-sm-6">
                                    <p class="form-control-static">
                                        <input  name="opterateTime" disabled  type="datetime"  value=" <fmt:formatDate value="${obj.opterateTime}" pattern="yyyy-MM-dd hh:mm:ss" />" class="form-control" placeholder="请输入最新操作时间"/>

                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>预约类型(修理，看车等)：</label>
                            <div class="col-sm-6">
                                <select class="form-control" name="appointmentTypeId">
                                    <c:forEach items="${typeList}" var="item">
                                        <option value="${item.id}"  <c:if test="${item.id eq obj.appointmentTypeId}">selected</c:if>  >${item.dvalue}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>




            </form>
        </div>
    </div>
</div>

</body>
<script src="/admin/frame/jquery/jquery-1.9.1.min.js"></script>
<script src="/admin/frame/bootstrap/js/bootstrap.min.js"></script>
<script src="/admin/js/content.min.js?v=1.0.0"></script>
<script src="/admin/frame/jquery-validate/jquery.validate.min.js"></script>
<script src="/admin/frame/jquery-validate/messages_zh.min.js"></script>
<script>
    $().ready(function() {
        $("#addForm").validate();
    });
</script>
</html>
